package com.hnevc.xiewenguang;

import java.io.File;

/**
 *
 * 遍历目录下的文件
 *
 */

public class Example05 {
    public static void main(String[] args) {
        File file = new File("C:\\Users\\Administrator\\IdeaProjects\\Demo01\\src\\com\\hnevc\\xiewenguang");
        if (file.isDirectory()){
            String[] names = file.list();
            for (String name:names){
                System.out.println(name);
            }
        }
    }
}
